package com.tensquare.article;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import util.IdWorker;

//启动类
@SpringBootApplication //启动类注解
@MapperScan("com/tensquare/article/dao") //开启包扫描
public class ArticltApplication {
    public static void main(String[] args) {
        SpringApplication.run(ArticltApplication.class);
    }

    //注入ID生成器
    @Bean
    public IdWorker createIdWorker(){
        return new IdWorker(1,1);
    }
}
